package crew.gwt.client.widgets.util;

import com.google.gwt.user.client.ui.Widget;

import crew.gwt.client.domain.PersistableEntity;
import crew.gwt.client.widgets.handler.OnContextChangeHandler;

public abstract class UpdatableEntityWidget<W extends Widget,T extends PersistableEntity<T>> implements OnContextChangeHandler {

	private final W widget;
	private T entity;
	
	public UpdatableEntityWidget(final W widget,final T entity) {
		this.widget = widget;
		this.entity = entity;
	}
	
	public W getWidget(){
		return widget;
	}

	public T getEntity() {
		return entity;
	}

	public void setEntity(T entity) {
		this.entity = entity;
	}
	
}
